package com.xinqi.modules.course.clazz.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xinqi.common.mybatis.data.entity.BaseEntity;
import com.xinqi.modules.course.course.enums.ClassAuditEnum;
import com.xinqi.modules.course.course.enums.ClassStatusEnum;
import lombok.Getter;
import lombok.Setter;

/**
 * 班级表实体层
 *
 * @author: system
 * @date: 2023/01/17
 */
@Setter
@Getter
@TableName("cl_class")
public class ClassEntity extends BaseEntity {
    /**
     * 主键
     */
    @TableField(value = "id")
    private Long id;
    /**
     * 乐观锁
     */
    @TableField(value = "version")
    private Integer version;
    /**
     * 学校ID
     */
    @TableField(value = "school_id")
    private Long schoolId;
    /**
     * 课程id
     */
    @TableField(value = "course_id")
    private Long courseId;
    /**
     * 拥有者ID
     */
    @TableField(value = "user_id")
    private Long userId;
    /**
     * 班级名称
     */
    @TableField(value = "name")
    private String name;
    /**
     * 教学学年
     */
    @TableField(value = "teaching_year")
    private String teachingYear;
    /**
     * 教学学期
     */
    @TableField(value = "teaching_node")
    private String teachingNode;
    /**
     * 教学地点
     */
    @TableField(value = "teaching_address", updateStrategy = FieldStrategy.IGNORED)
    private String teachingAddress;
    /**
     * 班级课程码
     */
    @TableField(value = "course_code")
    private String courseCode;
    /**
     * 二维码
     */
    @TableField(value = "qr_code")
    private String qrCode;
    /**
     * 加课码状态，1-正常；0-停用
     */
    @TableField(value = "status")
    private ClassStatusEnum status;
    /**
     * 1自动免审核 2手动审核
     */
    @TableField(value = "audit_method")
    private ClassAuditEnum auditMethod;
    /**
     * 审核信息，例如：姓名，手机号等
     */
    @TableField(value = "audit_info", updateStrategy = FieldStrategy.IGNORED)
    private String auditInfo;
    /**
     * 是否允许退课
     */
    @TableField(value = "is_drop_class")
    private Integer isDropClass;
    /**
     * 是否开启学生人数限制（0关闭，1开启）
     */
    @TableField(value = "is_student_count")
    private Integer isStudentCount;
    /**
     * 学生人数限制
     */
    @TableField(value = "student_count")
    private Integer studentCount;

    /**
     * 名称是否可编辑,0-不可编辑，1-可编辑，默认为1
     */
    @TableField(value = "is_name_editable")
    private Integer isNameEditable;
    /**
     * 扩展字段
     */
    @TableField(value = "extend")
    private String extend;
}
